From: Juri Linkov Date: Tue, 3 Sep 2019 20:47:46 +0000 (+0300) Subject: * lisp/tab-line.el (tab-line-tab-name): Try to use truncate-string-to-width. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~19^2~1717^2~16 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=1598de6ef216746649493b788f98b4972fd750af;p=emacs.git * lisp/tab-line.el (tab-line-tab-name): Try to use truncate-string-to-width. --- diff --git a/lisp/tab-line.el b/lisp/tab-line.el index da85925ff55..c678ce59bf8 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -126,8 +126,8 @@ Reduce tab width proportionally to space taken by other tabs." (max 1 (- (/ (window-width) (length buffers)) 3))))) (if (or (not limit) (< (length tab-name) limit)) tab-name - (propertize (concat tab-line-tab-name-ellipsis - (substring tab-name (- limit))) + (propertize (truncate-string-to-width tab-name limit nil nil + tab-line-tab-name-ellipsis) 'help-echo tab-name)))) (defvar tab-line-tabs-limit 15